package com.syt.mina.handler;

import org.apache.mina.core.session.IoSession;

import com.syt.util.UrlPathHelper;

import flex.messaging.io.amf.ASObject;


public class AMFPathHelper extends UrlPathHelper {
	@Override
	public String getLookupPathForRequest(IoSession session, Object message)throws Exception {
		if(message == null || !(message instanceof ASObject) ){
			throw new Exception();  //TODO
		}
		
		ASObject messageAS = (ASObject)message;
		return (String)messageAS.get("key");
	}
	
}
